From be0964d9e1d110ff647d3d6433835786b88f9435 Mon Sep 17 00:00:00 2001
From: Lauri Vuorela <lauri.vuorela@gmail.com>
Date: Mon, 5 Feb 2024 02:16:30 +0100
Subject: format currency with thousand separators (#81)

---
 src/app/groups/[groupId]/balances-list.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/app/groups/[groupId]/balances-list.tsx')

diff --git a/src/app/groups/[groupId]/balances-list.tsx b/src/app/groups/[groupId]/balances-list.tsx
index 5e7b81b..b795914 100644
--- a/src/app/groups/[groupId]/balances-list.tsx
+++ b/src/app/groups/[groupId]/balances-list.tsx
@@ -1,5 +1,5 @@
 import { Balances } from '@/lib/balances'
-import { cn } from '@/lib/utils'
+import { cn, formatCurrency } from '@/lib/utils'
 import { Participant } from '@prisma/client'
 
 type Props = {
@@ -28,7 +28,7 @@ export function BalancesList({ balances, participants, currency }: Props) {
             </div>
             <div className={cn('w-1/2 relative', isLeft || 'text-right')}>
               <div className="absolute inset-0 p-2 z-20">
-                {currency} {(balance / 100).toFixed(2)}
+                {formatCurrency(currency, balance)}
               </div>
               {balance !== 0 && (
                 <div
-- 
cgit v1.3

